package com.aliyun.order.server.service.impl;

import com.aliyun.order.server.dao.entity.OrderDO;
import com.aliyun.order.server.dao.mapper.OrderMapper;
import com.aliyun.order.server.service.InnerOrderService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Inner Order 服务实现
 *
 * 
 * @date 2024/12/01
 */
@Service
public class InnerOrderServiceImpl implements InnerOrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public OrderDO getOrderByUniqueKey(String uniqueKey) {
        QueryWrapper<OrderDO> queryWrapper = new QueryWrapper<>(OrderDO.class).eq("unique_key", uniqueKey);
        return orderMapper.selectOne(queryWrapper);
    }
}
